const path = require('path')
module.exports = {
  webpack: {
    alias: {
      '@': path.join(__dirname,'/src'),
      '@components':path.join(__dirname,'/src/components'),
      '@api':path.join(__dirname,'/src/api'),
      '@pages':path.join(__dirname,'/src/pages'),
      '@routes':path.join(__dirname,'/src/routes'),
      '@utils':path.join(__dirname,'/src/utils')
    }
  },
  babel: {
    plugins: [
      ['import', { libraryName: 'antd', style: 'css' }]
    ]
  },
  plugins: [
  
  ],
  devServer:{
      //配置服务器
      port:'9527',
      open:true,
      proxy:{
        //捕获以api路径开头的路径
				'/api': { 
				  target: 'http://rap2.taobao.org:38080/app/mock/264110', 
				    changeOrigin: true, 
            ws: false, 
            //重写路径
				    pathRewrite: {
				      '^/api': '/api'
				        }
				    }
			}
  }
}